/*修饰器是一个函数，来修改类的行为
* */
{
    let decoratorA = function (target, name, desc) {
        target.ss = 'A';
        target.say = world => {
            console.log(world)
        };
        //
        console.log(target);//ƒ A() {classCallCheck(this, A);}
        console.log(name);//undefined
        console.log(desc);//undefined
    };

    @decoratorA
    class A {
    }
    console.log(A.ss);
    A.say('hello');
}

{
    let decoratorB_p=function (target,name,desc) {
        console.log(target);//{constructor: ƒ, say: ƒ}
        console.log(name);//say
        console.log(desc);//{value: ƒ, writable: true, enumerable: false, configurable: true}
    };
    class B{
        @decoratorB_p
        say(){}
    }
}